﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO;
using System.Text;

namespace ANLP.LexerGenerator
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            StringBuilder sb=new StringBuilder();

            Lexer.LexerGenerator.Generate(new StringReader(@"%Namespace Turtle.Generated
%Visibility public
move      { return (int)Tokens.Move; }
up        { return (int)Tokens.Up; }
down      { return (int)Tokens.Down; }
[0-9]+    { return (int)Tokens.Number; }
,         { return (int)Tokens.Comma; }
[ \t\r\f\v] { return (int)Tokens.Whitespace; }
"), new StringWriter(sb));
            output.Text = sb.ToString();
        }
    }
}
